{{! Client-side Handlebars template for rendering the trailing bookend. }}
<div class="{{#if is_trailing_bookend}}trailing_bookend {{/if}}bookend sub-unsub-message">
    {{#if is_spectator}}
        <span class="recent-topics-link">
            <a href="#recent">{{t "Browse recent conversations" }}</a>
        </span>
    {{else}}
        <span class="stream-status">
            {{#if deactivated}}
                {{t "This channel has been archived." }}
            {{else if subscribed }}
                {{#tr}}
                    You subscribed to <z-stream-name></z-stream-name>.
                    {{#*inline "z-stream-name"}}{{> stream_privacy }} {{stream_name}}{{/inline}}
                {{/tr}}
            {{else if just_unsubscribed }}
                {{#tr}}
                    You unsubscribed from <z-stream-name></z-stream-name>.
                    {{#*inline "z-stream-name"}}{{> stream_privacy }} {{stream_name}}{{/inline}}
                {{/tr}}
            {{else}}
                {{#tr}}
                    You are not subscribed to <z-stream-name></z-stream-name>.
                    {{#*inline "z-stream-name"}}{{> stream_privacy }} {{stream_name}}{{/inline}}
                {{/tr}}
            {{/if}}
        </span>
    {{/if}}
    {{#if can_toggle_subscription}}
    <div class="sub_button_row new-style">
        <button class="button white rounded stream_sub_unsub_button {{#unless subscribed}}sea-green{{/unless}}" type="button" name="subscription">
            {{#if subscribed}}
            {{t 'Unsubscribe' }}
            {{else}}
            {{t 'Subscribe' }}
            {{/if}}
        </button>
    </div>
    {{/if}}
</div>
